Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

the-new-css-reset

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

the-new-css-reset

the new CSS reset, using new css features

  • 1.11.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

⏪ The New CSS Reset

A package that resets some of the default, user agent based, styles.

It doesn't affect the display property and special HTML elements like iframe, canvas, img, svg and video.

This package is using the new CSS features:

  • The global CSS reset keywords, unset and revert keywords.
  • The new property of all which can reset all properties combined.
  • The :where() pseudo-class to remove specificity.
  • The :not() pseudo-class with multi arguments.

Motivation

This package is built with the understanding that we don’t want to use default styles we are getting from the browsers, except for the display property.

How to get started?

Run npm i the-new-css-reset OR Download the Latest Version.

Once installed, you can use it in two different ways:

  1. Import /css/reset.css before the regular styles of the project.
  2. Include the following snippet in one of the JavaScript/TypeScript entry files:
import "the-new-css-reset/css/reset.css";

Want to exclude some of the resets?

You can revert to the default styles of the browser!

For example:

input[type="checkbox"],
input[type="radio"] {
    all: revert;
}

or all input elements:

input,
textarea,
select {
   all: revert;
}

Accessibility Recommendation

To keep your website accessible, don't forget to take care of the :focus states.

:focus { /* focus styles */ }

/* or/and */

:focus-visible { /* keyboard only focus styles */ }

Browser Support

ChromeEdgeFirefoxSafariOperaSamsung Internet
88+ ✔88+ ✔84+ ✔14+ ✔75+ ✔15+ ✔

Keywords

FAQs

Package last updated on 24 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc